package com.zs.blog.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zs.blog.model.ResponseResult;
import com.zs.blog.model.dto.ArticleCategoryDTO;
import com.zs.blog.model.dto.CategoryEditDTO;
import com.zs.blog.model.dto.CategorySearchDTO;
import com.zs.blog.model.entity.Category;
import com.zs.blog.model.vo.CategoryEditVO;
import com.zs.blog.model.vo.CategoryListVO;
import com.zs.blog.model.vo.PageInfoVO;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import java.util.List;

/**
 * @Title: ICategoryService
 * @Author zs
 * @Package com.zs.blog.service
 * @Date 2024/10/20 16:10
 * @description: 分类服务层接口
 */
public interface ICategoryService extends IService<Category> {
    /**
     * 获取分页的分类列表
     * @param pageNum 1
     * @param pageSize 10
     * @return PageInfoVO<CategoryVO>
     */
    PageInfoVO<CategoryListVO> listCategoryWithPagination(Integer pageNum, Integer pageSize);

    /**
     * 获取分页的搜索分类列表
     * @param categorySearchDTO 分类查询条件数据转换对象
     * @return PageInfoVO<CategoryListVO>
     */
    PageInfoVO<CategoryListVO> listCategoryBySearchCondition(CategorySearchDTO categorySearchDTO);

    ResponseResult<?> deleteCategoryByIds(List<Integer> categoryIdList);

    void addOrUpdateCategory(CategoryEditDTO categoryEditDTO);

    CategoryEditVO getCategoryByCategoryId(Long categoryId);

    List<CategoryListVO> listCategory();

}
